package com.atguigu.tingshu.payment.service;

import jakarta.servlet.http.HttpServletRequest;

import java.util.Map;

public interface WxPayService {

    /**
     * 创建微信支付订单
     * @param paymentType 1301:下单 1302：充值
     * @return {timeStamp:"",package:"",paySign:"",signType:"",nonceStr:""}
     */
    Map<String, String> createJsapi(String paymentType, String orderNo);

    /**
     * 查询订单支付状态
     * @param orderNo
     * @return true:已支付  false:未支付
     */
    boolean queryPayStatus(String orderNo);

    /**
     * 微信支付成功后，微信会主动调用商户的回调接口，返回支付结果
     * @param request
     * @return
     */
    void wxPaySuccessNotify(HttpServletRequest request);
}
